<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>10-相互转换</title>
    <script src="../js/jquery-3.6.0.js"></script>
    <script>
      $(function () {
        // jquery获取对象
        let $box1 = $("#box1");
        console.log($box1);
        // dom获取对象
        let boxEle1 = document.getElementById("box1");
        console.log(boxEle1);

        // 转换
        console.log($(boxEle1).val());
        console.log("--------")
        let box1 = $box1[0];
        console.log(box1);
      })
    </script>

</head>
<body>
<div id="box1" value="xixi">盒子</div>
</body>
</html>